//
//  GrabDiagnoseViewController.m
//  AnXin100
//
//  Created by Sakura on 2018/11/10.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "GrabDiagnoseViewController.h"
#import "ZXDropMenuView.h"
@interface GrabDiagnoseViewController ()<ZXDropMenuViewDelegate, ZXDropMenuViewDataSource>
@property (nonatomic, strong) ZXDropMenuView *dropMenuView;
@end

@implementation GrabDiagnoseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    _dropMenuView = [[ZXDropMenuView alloc]init];
    _dropMenuView.delegate = self;
    _dropMenuView.dataSource = self;
    [self.view addSubview:_dropMenuView];
    
    _dropMenuView.sd_layout
    .leftSpaceToView(self.view,0)
    .rightSpaceToView(self.view,0)
    .topSpaceToView(self.view,NAVIGATION_HEIGHT)
    .heightIs(44);
    
}

#pragma mark - Drop Menu View DataSourece & Delegate

//列数
- (NSInteger)numberOfColumnsInMenu:(ZXDropMenuView *)menu {
    
    return 1;
}
//行数
- (NSInteger)menu:(ZXDropMenuView *)menu numberOfRowsInColumn:(NSInteger)column {
    
    
    return 3;
    
}
//标题
- (NSString *)menu:(ZXDropMenuView *)menu titleForRowAtIndexPath:(ZXIndexPath *)indexPath {
    
    return @[@"1", @"2", @"3"][indexPath.row];
    
}

//已经选择的行
- (void)menu:(ZXDropMenuView *)menu didSelectRowAtIndexPath:(ZXIndexPath *)indexPath {
//    self.termIndex = indexPath.row;
//    [self.rightTableView.mj_header beginRefreshing];
    
    
}

@end
